<?php
require 'RequestCore.class.php';

function urlopen($url,$headers=array(),$data='')
{
	$rq = new RequestCore();
	if(!empty($data))
	{
		$rq->set_method(RequestCore::HTTP_POST);
		$rq->set_body($data);
	}
	$rq->request_headers = $headers;
	$rq->set_request_url($url);
	$rq->send_request();
	return $rq;
}
